<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('计划名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-plan_name" data-rule="required" class="form-control" name="row[plan_name]" type="text" value="{$row.plan_name|htmlentities}">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('关联订单')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-order_id" data-rule="required" class="form-control selectpicker" name="row[order_id]" data-live-search="true">
                <option value="">{:__('请选择订单')}</option>
                {foreach $orderList as $order}
                <option value="{$order.id}" {in name="order.id" value="$row.order_id"}selected{/in}>{$order.order_no} - {$order.customer_name} (数量: {$order.total_quantity})</option>
                {/foreach}
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('开始日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[start_date]" type="text" value="{$row.start_date}">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('结束日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[end_date]" type="text" value="{$row.end_date}">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('优先级')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-priority" class="form-control selectpicker" name="row[priority]">
                <option value="1" {in name="row.priority" value="1"}selected{/in}>低</option>
                <option value="2" {in name="row.priority" value="2"}selected{/in}>中</option>
                <option value="3" {in name="row.priority" value="3"}selected{/in}>高</option>
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remark" class="form-control" name="row[remark]" rows="3">{$row.remark|htmlentities}</textarea>
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
